<template>
  <div>
    <div class="werapp">
      <h1>订单详情</h1>
      <div class="box-item">
        <p>
          <b>订单号：</b
          >
          <el-input
            type="text"
            v-model="model.orderNo"
            placeholder="请输入商品名称"
            class="box-name"
          />
        </p>
        <p>
          <b>创建时间：</b
          ><el-input
            type="text"
            v-model="model.createTime"
            placeholder="请输入商品名称"
            class="box-name"
          />
        </p>
        <p>
          <b>收件人：</b
          ><el-input
            type="text"
            v-model="model.receiverName"
            placeholder="请输入商品名称"
            class="box-name"
          >
            <template slot-scope="scope">
                {{scope.row.shippingVo.receiverProvince}}
            </template>
          </el-input>
        </p>
        <p>
          <b>订单状态：</b
          ><el-input
            type="text"
            v-model="model.statusDesc"
            placeholder="请输入商品名称"
            class="box-name"
          />
        </p>
        <p>
          <b>支付状态：</b
          ><el-input
            type="text"
            v-model="model.paymentTypeDesc"
            placeholder="请输入商品名称"
            class="box-name"
          />
        </p>
        <p>
          <b>订单金额：</b
          ><el-input
            type="text"
            v-model="model.payment"
            placeholder="请输入商品名称"
            class="box-name"
          />
        </p>
        <el-table :data="list" border style="width: 100%">
          <el-table-column prop="productImage" label="商品图片" width="180">
            <template slot-scope="scope">
                <img :src="model.imageHost+scope.row.productImage" alt="" class="imgage">
            </template>
          </el-table-column>
          <el-table-column prop="productName" label="商品信息" width="180">
          </el-table-column>
          <el-table-column prop="currentUnitPrice" label="单价"> </el-table-column>
          <el-table-column prop="quantity" label="数量"> </el-table-column>
          <el-table-column prop="totalPrice" label="合计"> </el-table-column>
        </el-table>
      </div>
    </div>
  </div>
</template>

<script>
import {Orderdetail} from "../../api/index"
export default {
  data() {
    return {
      model: {},
      list:[],
    };
  },
  created () {
    Orderdetail({orderNo:this.$route.query.data}).then((res)=>{
        console.log(res);
        this.model=res.data
        this.list=res.data.orderItemVoList
    });
  },
};
</script>

<style lang="scss" scoped>
.werapp {
  padding: 15px 30px;
  h1 {
    font-size: 36px;
  }
  .box-item {
    .box-name {
      width: 300px;
      padding: 10px 0;
    }
  }
}
.imgage{
  width: 100px;
  height: 100px;
}
</style>